package com.ctvit.doxpath.dao;

import com.ctvit.doxpath.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

@Repository
public class OneDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public List<User> findAll() {

        List<User> query = jdbcTemplate.query("select * from user ", new User());
        return query;
    }
}
